<template>
    <div class="test">
        <a href="/">test</a>
    </div>
</template>

<script type="text/ecmascript-6">
    import ejs from 'ejs';
    import electron from 'electron';
    import path from 'path';
    import fs from 'fs';
    import Sequelize from 'sequelize';

    /**
     * @author 白雨浓
     * @date 2018/1/16 13:01
     *
     *
     **/
    export default{
        name: 'AcTest',
        data(){
            return {}
        },
        mounted(){
            this.$nextTick(() => {
                const sequelize = new Sequelize('gaokao', 'root', 'evil', {
                    host: 'localhost',
                    port: 3306,
                    dialect: 'mysql',
                    pool: {
                        max: 5,
                        min: 0,
                        idle: 30000
                    }
                });

                sequelize.query('SELECT * FROM user_info', {type: sequelize.QueryTypes.SELECT})
                    .then(data => {
                        alert(JSON.stringify(data));
                    })
                    .catch(err => {
                        console.table(err);
                    });
            })
        },
        methods: {}
    }
</script>

<style lang="stylus" rel="stylesheet/stylus" scoped>
    .test {
    }
</style>